define([
        'backbone',
        'GlobalConfiguration',
        '../../models/category/Mcategory'], 
function(
        Backbone,
        GConfigs,
        ModelCategories
        ) {

    var CollectionSearchByItem = Backbone.Collection.extend({
        model:ModelCategories,
        initialize:function(placeId,itemName){                       
            this.item_name = itemName;
            this.place_id = placeId;                                   
        },        
        url: function () {
            var URL = GConfigs.CONSTANTS.PROTOCOL + "://" +
                      GConfigs.CONSTANTS.HOST_NAME + ":" +
                      GConfigs.CONSTANTS.PORT_NO +
                      GConfigs.CONSTANTS.REST_PATH +
                      GConfigs.API.fetchProductInfoByCity +                                 
                      '&cityName=' + this.place_id + '&srchItem=' + this.item_name;            
            return URL;
        },
        parse: function (data) {          
            return data.rows;
        }
    });
    return CollectionSearchByItem;
});



